%{
    #include <stdio.h>
    #include "calc.tab.h"
    int column=1;
    int line=1;
%}
%option noyywrap

NUM [1-9]+[0-9]*|0
%%

{NUM}          { yylval.num = atoi(yytext); column++;return NUM;}
"&&"            { return AND;column++;}
"||"            { return OR;column++;}
"!"             { return NOT;column++; }
"<"             { return LES;column++;}
">"             { return GRE;column++;}
"<="            { return LESAE;column++;}
">="            { return GREAE;column++;}
"=="            { return EQL;column++; }
"!="            { return NEQ;column++; }
"("             { return LPA;column++; }
")"             { return RPA;column++; }
"//".*          {}
[ \t]+          {/*ignore whitespace characters*/}
\n              { return EOL;column=0;line++;}
.               { printf("Error:Invalid character at \" %s \" ,line %d,column %d \n",yytext,line,column);yyterminate();}
%%

